<?php

/**
* 
*/
class Zhou_ajaxController extends Common
{
    public $zhou_sima;
    function __construct()
    {
        parent::__construct();
        $this->zhou_sima = $this->model('zhou_sima');
    }
    public  function zhou_jobs_ajaxAction(){
        if ($_POST) {
            $page =isset($_POST['page']) ? $_POST['page'] : 1;
            $pageshow = 10;
            $where=" typeid = 1";
            $count = $this->zhou_sima->get_count('zhou_jobs','jobs_id',$where);
            $res = $this->zhou_sima->get_one_page($page,$pageshow,$count,'zhou_jobs',$where);
            // var_dump($res);die;
            // foreach ($res as $key => $value) {
            //     $res[$key]['parent'] = $this->zhou_sima->get_num_count('lei_golf_court_product','court_product_show = 1 AND court_product_court_id='.$value['court_id'],2);
            // }
            if (!empty($res)) {
                die(json_encode(array('str'=>1,'res'=>$res,'countpage'=>ceil($count/$pageshow))));
            }
            die(json_encode(array('str'=>2,'res'=>$res,'countpage'=>ceil($count/$pageshow))));
        }
    }
}